﻿/*
SINACOR - BMF&Bovespa
Arquivo: IAlocacaoDireta.cs
Criado em: 14-mai-2010 17:57:08
Arquiteto Responsável: p-dmartinelli
*/
using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceModel;
using System.ComponentModel;
using Sinacor.Infra.Common.Exceptions;
using Sinacor.Infra.Service.ExceptionHandling;
using Sinacor.Infra.Service.Security.Services;
using Sinacor.Infra.Common.Exceptions.FaultContracts;


namespace Sinacor.Servico.Bovespa.Alocacao.Service.ServiceContract 
{
	[ExceptionShielding]
	[ServiceContract(Namespace = "http://www.bovespa.com.br/Sinacor.Servico.Bovespa.Alocacao.Service.ServiceContract", SessionMode = SessionMode.Allowed)]
	public interface IAlocacaoDireta 
	{
		/// <summary>
		/// Aloca varios negocios
		/// Transacional: Sim
		/// </summary>
		/// <param name="request"></param>
		[FaultContract(typeof(BusinessFault))]
		[FaultContract(typeof(ValidationFault))]
		[FaultContract(typeof(GeneralFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))]
		[OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "AlocarNegocioDisponivel")]
        [OperationLog]
        [TransactionRequired]		
        void AlocarNegocioDisponivel(List<DataContract.Request.NegocioAlocadoDiretoRequest> request);

        /// <summary>
        /// Obtem os dados de usuario e cliente direcionado do alocação informada
        /// Transacional: Não
        /// </summary>
        /// <param name="request"></param>
        [FaultContract(typeof(BusinessFault))]
        [FaultContract(typeof(ValidationFault))]
        [FaultContract(typeof(GeneralFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
        [FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))]
        [OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ObterDirecionado")]
        DataContract.Response.DirecionadoResponse ObterDirecionado(DataContract.Request.NegocioAlocadoDiretoRequest request);

		/// <summary>
		/// Busca os negocios já alocados diretamente
		/// Transacional: Não
		/// </summary>
		/// <param name="request"></param>
		[FaultContract(typeof(BusinessFault))]
		[FaultContract(typeof(ValidationFault))]
		[FaultContract(typeof(GeneralFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))]
		[OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ConsultarNegociosAlocados")]
		List<DataContract.Response.NegocioAlocadoDiretoResponse> ConsultarNegociosAlocados(DataContract.Request.FiltroNegocioRequest request);

		/// <summary>
		/// Busca os negocios disponiveis para alocação direta
		/// Transacional: Não
		/// </summary>
		/// <param name="request"></param>
		[FaultContract(typeof(BusinessFault))]
		[FaultContract(typeof(ValidationFault))]
		[FaultContract(typeof(GeneralFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))]
		[OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ConsultarNegociosDisponiveis")]
		List<DataContract.Response.NegocioResponse> ConsultarNegociosDisponiveis(DataContract.Request.FiltroNegocioRequest request);

		/// <summary>
		/// Desaloca varios negocios
		/// Transacional: Sim
		/// </summary>
		/// <param name="request"></param>
		[FaultContract(typeof(BusinessFault))]
		[FaultContract(typeof(ValidationFault))]
		[FaultContract(typeof(GeneralFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.InvalidSessionFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.LicensingFault))]
		[FaultContract(typeof(Sinacor.Infra.Common.Exceptions.FaultContracts.AccessIsDeniedFault))]
		[OperationContract(IsTerminating = false, IsInitiating = true, IsOneWay = false, Action = "ExcluirNegocioAlocado")]		
        [OperationLog]
        [TransactionRequired]
        void ExcluirNegocioAlocado(List<DataContract.Request.NegocioAlocadoDiretoRequest> request);
	}

}